home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wlib11_2.zip / EXAMPLES.EXE / EXAM2.C < prev    next >
C/C++ Source or Header  |  1991-03-13  |  2KB  |  66 lines

  1.    #include "window.h"
  2.    #define NORM   CREATE_VIDEO_ATTRIBUTE(black,white)  /* define video
  3.                                                           attribute */
  4.    #define BLUEONBLACK  CREATE_VIDEO_ATTRIBUTE(black,blue)  /* define
  5.                                                            video attribute */
  6.    #define REDONBLACK   CREATE_VIDEO_ATTRIBUTE(black,red)
  7.    #define GREENONBLACK CREATE_VIDEO_ATTRIBUTE(black,green)
  8.  
  9.    main()
  10.    {
  11.      int i;
  12.      WPOINTER w1,w2,w3;             /* pointers to a window structures */
  13.      WindowInitializeSystem();     /* system initialization function */
  14.      WindowSaveInitial(0);
  15.      w1 = WindowInitialize(BORDER,          /* Window has a border */
  16.             1,               /* row on the screen to open window */
  17.             1,               /* column on screen to open window */
  18.  
  19.             30,              /* width in characters of the window */
  20.             15,              /* height of characters in window */
  21.             BLUEONBLACK,     /* video attribute of text area of window */
  22.             NORM,            /* video attribute of border */
  23.  
  24.             SINGLEBOX);      /* type of border to draw */
  25.  
  26.      /* define second window */
  27.      w2 = WindowInitialize(BORDER,3,3,30,15,REDONBLACK,NORM,DOUBLEBOX);
  28.  
  29.      /* define third window */
  30.  
  31.      w3 = WindowInitialize(BORDER,5,5,30,15,GREENONBLACK,NORM,SINGLEBOX);
  32.  
  33.      WindowOpen(w1);      /* make window 1 ok to write */
  34.  
  35.      WindowOpen(w2);      /* make window 2 ok to write */
  36.  
  37.      WindowOpen(w3);      /* make window 3 ok to write */
  38.  
  39.      WindowDisplay(w1,1,NOEFFECT);
  40.      WindowDisplay(w2,2,NOEFFECT);
  41.      WindowDisplay(w3,3,NOEFFECT);
  42.  
  43.      GET_KEY();
  44.  
  45.      WindowDisplay(w2,1,NOEFFECT);
  46.  
  47.      GET_KEY();
  48.  
  49.      WindowDisplay(w3,1,NOEFFECT);
  50.  
  51.      GET_KEY();
  52.  
  53.      WindowDisplay(w1,1,NOEFFECT);
  54.  
  55.      GET_KEY();
  56.  
  57.      WindowClose(w2,NOEFFECT);
  58.  
  59.      GET_KEY();
  60.  
  61.      WindowClose(w3,NOEFFECT);
  62.  
  63.      GET_KEY();
  64.  
  65.      WindowClose(w1,NOEFFECT);
  66.    }